package com.mzj.saas.jobs.bill.repository;

import com.mzj.saas.jobs.bill.entity.EstateViolateBill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface EstateViolateBillRepository extends PagingAndSortingRepository<EstateViolateBill, Long>, JpaSpecificationExecutor<EstateViolateBill>, JpaRepository<EstateViolateBill, Long> {
        List<EstateViolateBill> findByRuleId(String ruleId);


        List<EstateViolateBill> findByPaymentStatus(Integer paymentStatus);
        List<EstateViolateBill> findByPaymentStatusAndLeaseStatus(Integer paymentStatus,Integer leaseStatus);

        List<EstateViolateBill> findByBillIdAndPaymentStatus(Long ruleId,Integer paymentStatus);

        //@Query("select b from EstateViolateBill b where b.billId = ?1 ")
        //List<EstateViolateBill> findByBillId(Long billId);

 }
